<!-- <p-button label="{{'Back'|translate}}" (onClick)="goback()" iconPos="left" icon="fa fa-arrow-left"></p-button> -->
<h3>{{'My Property Management'|translate}}</h3>
{{'Total Commission Unit'|translate}}: {{totalCommisionUnit}} , {{'Monthly Commission'|translate}}: {{monthlyCommission}}
<p-table #dt [columns]="cols" [value]="records" [responsive]="true" [paginator]="true" [rows]="10">
    <ng-template pTemplate="caption">
        <div style="text-align: right">
            
            <input type="text" pInputText size="20" placeholder="{{'Global Filter'|translate}}" (input)="dt.filterGlobal($event.target.value, 'contains')"
                style="width:auto">
                <i class="fa fa-search" style="margin:4px 4px 0 0"></i>
        </div>
    </ng-template>
    <ng-template pTemplate="header" let-columns>
        <tr>
            <th *ngFor="let col of columns" [pSortableColumn]="col.field">
                {{col.header}}
                <p-sortIcon [field]="col.field"></p-sortIcon>
            </th>
        </tr>

    </ng-template>
    <ng-template pTemplate="body" let-rowData let-columns="columns">
        <tr [pSelectableRow]="rowData">
            <td *ngFor="let col of columns">
                {{rowData[col.field]}}
            </td>
            <td>
                <button type="button" class="btn btn-warning btn-sm" (click)="onViewRow(rowData)">{{'View'|translate}}</button>
            </td>
        </tr>
    </ng-template>
</p-table>